package com.wclass.controller.app;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.wclass.common.ReturnObject;
import com.wclass.entity.BaseAgreement;
import com.wclass.entity.BaseCollect;
import com.wclass.interceptor.IgnoreAuth;
import com.wclass.service.IBaseAgreementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 相关协议内容 前端控制器
 * </p>
 *
 * @author SEN
 * @since 2019-02-13
 */
@Api(description = "相关协议内容")
@RestController
@RequestMapping("/agreement")
public class AgreementController {

    @Autowired
    private IBaseAgreementService agreementService;

    @IgnoreAuth
    @ApiOperation("获取协议详情")
    @RequestMapping(value = "/getAgreementInfoById", method = RequestMethod.POST)
    public ReturnObject<Object> getAgreementInfoById(@ApiParam("id(id:1-注册协议)，id:2-入驻协议，id:3-用户隐私政策，id:4-机构入驻协议") @RequestParam Long id) {
        return new ReturnObject<>(0, "获取成功", agreementService.selectById(id));
    }
}

